function test() {
    return new Promise(resolve => {
        setTimeout(() => resolve("test"), 2000);
    });
}

async function start() {
    const result = await test();
    console.log(result);
    console.log('end');
}

start();
